<header>
    <h1><?php echo Lang::t('message.list.page.title'); ?></h1>
</header>

<div class="alert alert-info"><?php echo Lang::t('message.list.form.note'); ?></div>

<?php $this->getFlashes(array('class'=>'alert alert-{status}')); ?>

<?php //$this->widget('AdvancedSearchWidget', array('formView' => '_search', 'model' => $model)); ?>

<?php
$dataProvider->pagination->pageSize=Yii::app()->request->getParam('pageSize_', 30);
$this->widget('ext.extended.GridView', array(
    'id' => 'grid',
    'ajaxUpdate'=>false,
    'dataProvider' => $dataProvider,
    'filter' => $model,
    'htmlOptions'=>array(
        'class'=>'table-responsive',
    ),
    'itemsCssClass'=>'table table-hover',
    'columns' => array(
        array(
            'filterHtmlOptions'=>array('class'=>'id-filter'),
            'header'=>Lang::t('message.lbl.id'),
            'name'=>'id_',
            'value' => '$data->id',
            'htmlOptions' => array('class' => 'id-column'),
        ),
        array(
            'name' => 'name_',
            'value' => '$data->senderName',
            'htmlOptions'=>array(
                'style'=>'width:200px;',
            ),
        ),
        array(
            'name'=>'email_',
            'value'=>'$data->senderEmail',
        ),
        array(
            'name' => 'subject_',
            'value' => '$data->subject',
        ),
        array(
            'header' => Lang::t('message.lbl.created.time'),
            'filter' => false,
            'value' => 'date("d-M-Y", $data->createdTime)',
            'htmlOptions'=>array(
                'style'=>'width:100px; text-align:center;',
            ),
        ),
        array(
            'class' => 'CButtonColumn',
            'template' => '{view} {delete}',
        ),
        array(
            'class' => 'CCheckBoxColumn',
            'selectableRows' => 2,
        ),
    ),
));
?>